package com.iqik.dubbo_spi;

import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.config.annotation.Reference;

public class DubboAdaptiveMain {

    @Reference
    HelloService adaptive;

    public static void main(String[] args) {
        URL url = URL.valueOf("test://localhost/hello?hello.service=dog");
        HelloService adaptive = ExtensionLoader.getExtensionLoader(HelloService.class).getAdaptiveExtension();
        String result = adaptive.sayHello(url);
        System.out.println(result);
    }
}
